<script>
export default {
  globalData: {
    currentTable: 1, // 首页tab切换标记
    theme: {}, // 切花护眼模式
  },
  onLaunch: function (options) {
    console.log('App Launch', options)

    // 存在用户id进行自动登录
    if (options.query.userId) {
      uni.clearStorageSync()
      uni.showLoading({
        title: '加载中',
      })
      this.$https
        .post({
          url: '/axh/dtUsers/loginDtUsers',
          data: {
            userId: options.query.userId,
          },
        })
        .then((res) => {
          // 查询菜单权限
          uni.setStorageSync('accesstoken', res.token)
          // store.commit('setUserInfo', res.dtUsersVo)
          this.$https.post({ url: '/axh/phone/role' }).then((res) => {
            uni.setStorageSync('appRole', JSON.stringify(res.result))
            this.$https.post({ url: '/axh/indexAccountDetail' }).then((res) => {
              uni.setStorageSync('manageAreaList', res.result.manageAreaList.join('，'))
              this.$isResolve()
            })
          })
        })
    } else {
      this.$isResolve()
    }
  },
  onShow: function () {
    console.log('App Show')
  },
  onHide: function () {
    console.log('App Hide')
  },
}
</script>

<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import 'uview-ui/index.scss';
/*每个页面公共css */
@import '/static/css/base.scss';

.diyPopView {
  max-height: 75vh;
  border-top-left-radius: 30rpx;
  border-top-right-radius: 30rpx;
}

button {
  &::after {
    border: none;
  }
}

.buttonPlanAndProgramListView {
  .u-icon__label {
    padding-left: 14rpx;
  }
  .wx-slider-handle-wrapper {
    height: 8rpx;
  }

  slider {
    margin: 0 0 20rpx 0 !important;
  }
}

.productInfoCell {
  .u-cell__title-text {
    font-size: 24rpx !important;
  }

  .u-cell__value {
    font-size: 24rpx !important;
  }

  .u-cell__body {
    padding: 30rpx !important;
  }
}

.englishExamView {
  .examDetailView {
    margin: 0 0 !important;
  }
}

.szCommonBtnEnglish {
  background-color: #04ae64 !important;
}

.menuView {
  position: fixed;
  top: 600rpx;
  right: -70rpx;
  padding: 50rpx 6rpx;
  border-top-left-radius: 18rpx;
  border-bottom-left-radius: 18rpx;
  width: 100rpx;
  z-index: 2;
  background-color: #fff;
  box-shadow: 0 0 14rpx 14rpx #f1f1f1;
}

// 修改empty的样式
.u-empty {
  text-align: center;
  display: block !important;

  image {
    display: block !important;
    margin: auto;
  }

  .u-empty__text {
    flex-direction: column !important;
    display: block !important;
  }
}

.writeBookAll {
  .u-album__row__wrapper {
    image {
      border-radius: 14rpx !important;
    }
  }
}

.textErrorMsg {
  .u-textarea__count {
    background-color: #f6f6f6 !important;
  }

  .u-textarea {
    background-color: #f6f6f6 !important;
  }
}

page,
.pageMain {
  height: 100%;
}

.examTagsCommon {
  position: absolute;
  left: 4rpx;
  top: 8rpx;
  font-size: 22rpx;
  color: #fff;
  padding: 2rpx 10rpx;
  border-radius: 10rpx;
}

.loadingView {
  margin: auto;
  text-align: center;
  margin-top: 200rpx;
}

.examParent {
  ._root {
    text-indent: 70rpx;
  }
}

.oneCourseDataImage,
.allCourse,
.oneExamFunView,
.oneFmImage,
.themeAllView,
.collectView,
.addressPng,
.bigImage,
.oneSchoolView {
  .u-image {
    margin: auto;
  }
}

.examMeunView {
  .u-cell__body {
    padding: 30rpx 0 !important;
  }

  .u-cell__title-text {
    font-size: 28rpx !important;
  }
}

.methodBorder {
  position: absolute;
  height: 28rpx;
  top: 6rpx;
  left: 0;
  border-left: 10rpx solid #2d74e8;
}

.rateView,
.allCourse {
  .u-rate__content {
    margin: auto;
  }
}

.oneHcvImage {
  .u-image {
    margin: auto;
  }
}

.gotoBmBtn {
  .u-button {
    padding: 0 50rpx !important;
    box-shadow: 0px 2px 10px 0px #5a6ef0;
  }
}

/** 首页的滚动 */

.pageIndex {
  .u-notice-bar {
    border-radius: 50rpx;
  }
}

// 图片大小
.courseIndexView {
  .u-button {
    border-radius: 18rpx !important;
  }

  .elseMethodView {
    .codeing {
      .u-icon__img {
        width: 40rpx !important;
        height: 40rpx !important;
      }
    }

    .u-icon__img {
      width: 52rpx !important;
      height: 52rpx !important;
    }
  }
}
</style>
